# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=vifm
pkgver=0.12.1
pkgrel=1
pkgdesc="A file manager with curses interface, which provides Vi[m]-like environment"
arch=('loong64' 'x86_64')
url="https://vifm.info/"
license=('GPL')
depends=('ncurses' 'desktop-file-utils')
makedepends=('perl')
changelog=$pkgname.changelog
source=(https://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2{,.asc})
validpgpkeys=('22349CDBE5227D2108A5667799DC5E4DB05F6BE2') # xaizek <xaizek@posteo.net>
sha256sums=('8fe2813ebdcccfe99aece02b05d62a20991525d46b0ccfbaec3af614c6655688'
            'SKIP')

build() {
  cd "${srcdir}"/$pkgname-$pkgver

  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver

  make DESTDIR="${pkgdir}" install
}
